﻿namespace com.oakwoodsys.Extensions.SymbolExtensions
{
    using System;
    using System.Linq.Expressions;

    public static class SymbolExtensions
    {
        #region Methods

        public static string GetPropertySymbol<T, R>( this T obj, Expression<Func<T, R>> expr )
        {
            return ( ( MemberExpression ) expr.Body ).Member.Name;
        }

        #endregion Methods
    }
}